package team.nmsg.ge.system.bean;

import java.util.ArrayList;
import java.util.List;

import team.nmsg.ge.system.interf.ISysBean;

import com.alibaba.fastjson.JSONObject;

public class PageMenu implements ISysBean {
	
	public PageMenu(){}
	
	public PageMenu( SysOper oneOper){
		this.id = oneOper.getOperId().toString();
		this.name = oneOper.getOperName();
		this.icon = oneOper.getIcon();
		this.url = oneOper.getUrl();
		this.mtype = oneOper.getOtype();
	}
	
	private String id;
	
	private String name ;
	
	private String icon;
	
	private String url;
	
	private int mtype;

	private List<PageMenu> childs = new ArrayList<PageMenu>();
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getMtype() {
		return mtype;
	}

	public void setMtype(int mtype) {
		this.mtype = mtype;
	}

	public List<PageMenu> getChilds() {
		return childs;
	}

	public void setChilds(List<PageMenu> childs) {
		this.childs = childs;
	}
	
	public void addChild(PageMenu... menu ) {
		for( PageMenu e :  menu ){
			childs.add(e);
		}
	}

	@Override
	public JSONObject toJson() {
		return null;
	}
	
	
}
